<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:replace="fragments/custom_base::commonHead"></th:block>
    <th:block th:replace="fragments/custom_link::home-css"></th:block>
    <th:block th:replace="fragments/custom_link::home-js"></th:block>
</head>
<body>
<th:block th:replace="fragments/custom_base::commonNav"></th:block>



<div class="layui-container">
    <div class="layui-row">
        <div class="layui-col-md12">
            <div class="pan-tbox">
                <h2 class="pan-title">检索</h2>
                <p class="pan-desc">
                    当前检索到 <span class="layui-badge" th:text="${total}">1</span> 条结果。
                </p>
            </div>
        </div>
    </div>
    <div class="layui-row">
        <div class="layui-col-md8 layui-col-md-offset2">

            <th:block th:replace="fragments/custom_base::commonSearch"></th:block>


            <div class="layui-card">
                <div class="layui-card-header">
                    <h2 class="pan-title">检索结果</h2>
                </div>
                <div class="layui-card-body">
                    <div th:if="${!#lists.isEmpty(webPostList)}">
                        <div class="article-list">
                            <div th:each="post : ${webPostList}">
                                <div class="article-item">
                                    <div class="article-title">
                                        <a th:href="@{/article(postId=${post.id})}"><span th:text="${post.title}">文章标题</span></a>
                                    </div>
                                    <div class="article-info">
                                        <span th:text="${#dates.format(post.createdAt, 'yyyy-MM-dd hh:mm:ss')}">2023-08-01</span>
                                        <i class="layui-icon layui-icon-right"></i>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div th:unless="${!#lists.isEmpty(webPostList)}">
                        <p>没有找到相关结果。</p>
                    </div>
                </div>
            </div>

        </div>
    </div>
    <div class="layui-row">
        <div class="layui-col-md12">
            <th:block th:replace="fragments/custom_base::commonFeedback"></th:block>
        </div>
    </div>
</div>


<th:block th:replace="fragments/custom_base :: commonFooter"></th:block>
</body>
<th:block th:replace="fragments/custom_base :: commonScript"></th:block>
</html>